package com.qf.service.impl;

import com.qf.entity.Emp;
import com.qf.mapper.EmpMapper;
import com.qf.service.EmpService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

@Service
public class EmpServiceImpl implements EmpService {
    @Resource
    private EmpMapper empMapper;


    @Override
    public int add(Emp emp) {
        System.out.println("Service的emp = " + emp);
        return empMapper.add(emp);
    }

    @Override
    public int delete(int id) {
        return empMapper.delete(id);

    }

    @Override
    public int update(Emp emp) {
        return empMapper.update(emp);
    }

    @Override
    public List<Emp> findAll() {
        return empMapper.findAll();
    }
}
